from utils.count_time import time_function
from utils.my_ocr import get_image_size


@time_function
def main():
    """
        请求参数：app_key+timestamp+token+image_data/image_file
    注：token生成方式（md5($appkey+$timestamp+$appSecret)
    token=md5("c5ed72329fece2fe0010a437505b01cb+1522374165+5c9597f3c8245907ea71a89d9d39d08e")
    =7007bd1257dce8d47489166a7c77a926）
    :return:
    """
    file_path = r'C:\Users\DuFei\Pictures\Saved Pic' \
                r'tures\8b59bb061865f1778d5b71edbf937ad.png'
    req = get_image_size(file_path)
    if req:
        print(req['data']['response'])
    else:
        print(req)


if __name__ == '__main__':
    main()
